package com.peaksport.pkms.learn.day21.helloworld.provider;

import org.apache.servicecomb.core.BootListener;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

@Component
@Slf4j
public class Day21BootListener implements BootListener {

	@Override
	public void onBootEvent(BootEvent bootEvent) {
		if (EventType.AFTER_REGISTRY.equals(bootEvent.getEventType())) {
			log.info("======注册成功=====");
		} else if (EventType.BEFORE_CLOSE.equals(bootEvent.getEventType())) {
			log.info("=========正常开始停机=========");
		}
	}

}
